<% content_for :subnav do %>
<div class="group-heading">
  <div class="container">
    <div class="heading">
      <div class="group-name">
        <div class="group-avatar-box">
          <%= user_avatar_tag(@group, style: :medium, link: false) %>
        </div>
        <div class="group-title">
          <h1><%= link_to @group.name, @group.to_path %></h1>
          <% if @group.description.present? %>
          <div class="group-description">
            <%= @group.description %>
          </div>
          <% end %>
        </div>
      </div>

      <div class="heading-actions">
        <div class="group-info">
          <div class="group-location-url">
            <% if @group.location.present? %>
            <span class="group-location ml-3"><%= icon_tag("location") %> <%= @group.location %></span>
            <% end %>
            <% if @group.url.present? %>
            <span class="group-url ml-3"><%= link_to icon_tag("text-link", label: @group.url), @group.url %></span>
            <% end %>
          </div>
        </div>

        <nav class="reponav" role="navigation">
          <%= render_list_items(type: :link, class: "reponav-item", active_class: "selected") do |item|
            item << link_to(t(".Repository"), @group.to_path, class: "reponav-item")
            item << link_to(t(".Search"), search_group_path(@group), class: "reponav-item") if current_page?(search_group_path(@group))
            item << link_to(t(".Member"), group_members_path(@group), class: "reponav-item")
            item << link_to(t(".Settings"), group_settings_path(@group), class: "reponav-item") if can? :update, @group
          end %>
        </nav>
      </div>
    </div>
  </div>
</div>
<% end %>


<% content_for :nav_search do %>
  <%= render partial: "/layouts/search_nav", locals: { props: { action: search_group_path(@group), scope: t(".Group"), value: params[:q] } } %>
<% end %>
